Image scanning apparatus

ABSTRACT

An image scanning apparatus is configured to obtain a greatest gray gradation value when the light source illuminates the gray reference member at a first light quantity value, obtain a gradation value of a black signal output by the signal conversion unit when the light source is powered off, calculate a first difference value, set a second light quantity value, set a correction light quantity value, obtain a second difference value by subtracting the gradation value of the black signal from the second gradation value of a white signal, calculate a shading correction value based on a ratio of the second difference value to the first difference value, control the scanning unit to scan the image on the original sheet with controlling the light source to illuminate the original sheet in accordance with the second light quantity value, and apply the shading correction in accordance with the shading correction value.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority under 35 U.S.C. §119 from JapanesePatent Application No. 2014-074038 filed on Mar. 31, 2014. The entiresubject matter of the application is incorporated herein by reference.

BACKGROUND

1. Technical Field

The present disclosures relate to an image scanning apparatus using agray reference member of which a reflection coefficient is lower thanthat of a white reflection member.

2. Related Art

Generally, an image scanning apparatus employs a white reference memberas a light distribution reference member to be used for a shadingcorrection. When scanning is executed, an image of an original sheetpassing over the white reference member is scanned. When the whitereference member is used, however, there may occur a show-throughphenomenon which is a phenomenon that a change in thickness of color ona back surface of the original sheet affects scanning of an image formedon a front surface of the original sheet. In order to reduce such ashow-through phenomenon, image scanning apparatuses employing the grayreference member, which has a smaller reflection coefficient than thewhite reference member, have been suggested recently.

An example of such an image scanning apparatus employs a non-whitereference member which is provided as a guide for the original sheet ina sheet conveying device. In such an image scanning apparatus, theshading correction is performed, based on the reflection coefficient ofthe non-white reference member, so that a reflection density obtained byscanning the non-white reference member has substantially the samequantity as a reflection density obtained by scanning the whitereference member. When an image on the original sheet, which is conveyedby the conveying device, is scanned, the shading correction is appliedbased on the reflection density compensated as above.

SUMMARY

According to the conventional art as described above, a reflectiondensity obtained by scanning the non-white reference member iscompensated based on the reflection coefficient of the non-whitereference member on the premise that the reflection density and thereflection coefficient have an inverse proportional relationship.

However, the reflection density obtained by scanning the lightdistribution reference member varies depending on various factors suchas a surface condition of a reflecting surface of the light distributionreference member, diffusion characteristics of the reflection surface,and the like. Therefore, even if illumination light quantity of a lightsource is constant, the reflection density may not be preciselyinversely proportional to the reflection coefficient of the lightdistribution reference member. Because of this, the compensatedreflection density based on the reflection coefficient may be differentfrom the reflection density by actually scanning the white referencemember. Therefore, when an image of a white-tinged original sheet isscanned, even though the shading correction is performed using thecompensated reflection density, there may occur fluctuation ofthickness, or fluctuation of tone gradation in the scanned image.

In order to reduce such a fluctuation of tone gradation, it may bepossible to obtain gradation values as white reference data and use thesame for the shading correction by scanning the white reference memberbefore an image of the conveyed original sheet is scanned on thenon-white reference member. However, scanning of the white referencemember every time the original sheet is scanned results in elongation ofan operating time for the scanning.

In consideration of the above, aspects of the disclosures provide animproved image scanning apparatus capable of suppressing the fluctuationof tone gradation of the image which is scanned with use of the grayreference member without elongating the operating time for scanning.

According to aspects of the disclosures, there is provided an imagescanning apparatus, which is provided with a gray reference memberarranged in a conveying path in which an original sheet is to beconveyed, the gray reference member having a reflection coefficientsmaller than that of a white color, a scanning unit configured to scanan image on the original sheet on a line basis, the scanning unitincluding a light source configured to illuminate the original sheetwhen passing the gray reference member and a plurality of photoelectricconversion elements aligned in a scanning direction which is atransverse direction of the conveying path, a signal conversion unitconfigured to convert analog signals from the plurality of photoelectricconversion elements to digital signals, and a controller. The controlleris configured to obtain a greatest gray gradation value among aplurality of gradation values of gray signals output by the signalconversion unit when the light source illuminates the gray referencemember at a first light quantity value, the first light quantity valuebeing set so that white signals would be output by the signal conversionunit if the light source would illuminate a white reference member atthe first light quantity, obtain a gradation value of a black signaloutput by the signal conversion unit when the light source is poweredoff, calculate a first difference value by subtracting the gradationvalue of the black signal from the greatest gray gradation value among aplurality of gradation values of gray signals, set a second lightquantity value such that a gray signal having the gray gradation valueis output by the signal conversion unit when the light sourceilluminates the gray reference member at the second light quantityvalue, set a correction light quantity value such that a white signalhaving a second gradation value is output by the signal conversion unitwhen the light source illuminates the gray reference member, obtain asecond difference value by subtracting the gradation value of the blacksignal from the second gradation value of a white signal which is outputby the signal conversion unit when the light source illuminates the grayreference member in accordance with the correction light quantity value,calculate a shading correction value based on a ratio of the seconddifference value to the first difference value, control the scanningunit to scan the image on the original sheet with controlling the lightsource to illuminate the original sheet in accordance with the secondlight quantity value, and apply the shading correction to the digitalsignal output by the signal conversion unit in accordance with theshading correction value.

According to aspects of the disclosures, the scanning unit may scan animage on one surface of the original sheet or images on both surfaces ofthe original sheet. In the latter case, two scanning units may beprovided at the conveying path.

According to aspects of the disclosures, when the scanning unit isconfigured to obtain the gray gradation value and the first differencevalue before an image on the original sheet is scanned, the image on theoriginal sheet may be scanned in accordance with a user's operation orautomatically when a predetermined condition is fulfilled. Further, thegray gradation value and the first difference value may be detected andstored when the image scanning apparatus is manufactured or after theimage scanning apparatus is shipped from a factory, in accordance withan operation of itself.

According to aspects of the disclosures, the second gradation value isthe greatest gradation value of the white signal when the light sourceilluminates the gray reference member, and the value is determined basedon the configuration of the photoelectric conversion elements and thesignal conversion unit.

According to aspects of the disclosures, the first difference value orthe second difference value may be a maximum difference value from amongdifference values calculated by subtracting the black signal gradationvalues from the white signal gradation values for respective pixels, oran averaged difference value which is an average of the differencevalues calculated by subtracting the black signal gradation values fromthe white signal gradation values for respective pixels.

BRIEF DESCRIPTION OF THE ACCOMPANYING DRAWINGS

FIG. 1 is a cross-sectional side view schematically showing maincomponents of an image scanning apparatus according to an illustrativeembodiment of the disclosures.

FIG. 2 schematically shows a scanning unit of the image scanningapparatus according to the illustrative embodiment of the disclosures.

FIG. 3 schematically shows a configuration of a light receiving unit ofthe scanning unit according to the illustrative embodiment of thedisclosures.

FIG. 4 is a block diagram showing an electrical configuration of theimage scanning apparatus according to the illustrative embodiment of thedisclosures.

FIG. 5 is a flowchart illustrating a maintenance main process accordingto the illustrative embodiment of the disclosures.

FIG. 6 is a flowchart illustrating a scanning light quantity adjustingprocess, which is a process to adjust light quantity for scanning,according to the illustrative embodiment of the disclosures.

FIG. 7 is a flowchart illustrating a maximum value of gray-referencedgray data detection process, which is a process according to theillustrative embodiment of the disclosures.

FIG. 8 is a flowchart illustrating a shading light quantity adjustingprocess, which is a process to adjust light quantity for shading,according to the illustrative embodiment of the disclosures.

FIG. 9 is a flowchart illustrating a scanning main process according tothe illustrative embodiment of the disclosures.

FIG. 10 is a flowchart illustrating a calibration process, which is asub process according to the illustrative embodiment of the disclosures.

FIG. 11 is a flowchart illustrating a shading correction differencesetting process according to the illustrative embodiment of thedisclosures.

FIG. 12 is a flowchart illustrating a shading correction datacalculation process, which is a sub process according to theillustrative embodiment of the disclosures.

FIG. 13 is a graph showing gradation values of gray-referenced whitedata, gray-referenced gray data, and gray-referenced black data.

DETAILED DESCRIPTION OF THE ILLUSTRATIVE EMBODIMENTS

Hereinafter, referring to the accompanying drawings, an image scanningapparatus 1 according to an illustrative embodiment of the disclosureswill be described. In the following description, when directions areindicated, directions depicted in FIG. 1 will be referred to.

It is noted that various connections are set forth between elements inthe following description. It is noted that these connections in generaland, unless specified otherwise, may be direct or indirect and that thisspecification is not intended to be limiting in this respect. Aspects ofthe present disclosure may be implemented on circuits (such asapplication specific integrated circuits) or in computer software asprograms storable on computer-readable media including but not limitedto RAMs, ROMs, flash memories, EEPROMs, CD-media, DVD-media, temporarystorages, hard disk drives, floppy drives, permanent storages, and thelike.

As shown in FIG. 1, the image scanning apparatus 1 has a sheet feedingtray 2, a main body 3, a discharged sheet tray 4. Further, an operationunit 5, a display unit 6 are arranged on an upper surface of the mainbody 3. The operation unit 5 includes a power switch, and varioussetting buttons, and is configured to acquire an operationalinstructions by a user. For example, the operation unit 5 may include aselection button to select a color mode using three colors or amonochrome mode using a single color, a resolution setting operationbutton, and the like. The display unit 6 includes an LCD (liquid crystaldisplay) and displays an operational status of the image scanningapparatus 1.

A conveying path 20 is defined inside the main body 3. The originalsheets GS placed on the sheet feeding tray 2 are conveyed in a conveyingdirection FD, along the conveying path 20, and is discharged on adischarged sheet tray 4. A feeding roller 21, a separation pad 22, apair of upstream conveying rollers 23, a scanning unit 24, a platenglass 25 and a pair of downstream conveying rollers 26 are arrangedalong the conveying path 20 as shown in FIG. 1.

The feeding roller 21, in association with the separation pad 22, feedsthe plurality of original sheets GS placed on the sheet feeding tray 2one by one. The upstream conveying rollers 23 and the downstreamconveying rollers 26 are driven by a conveying motor MT (see FIG. 4).The platen glass 25 is a transparent member and arranged along and belowthe conveying path 20. The conveying rollers 23 and 26 convey theoriginal sheet GS fed from the feeding roller 21 to pass over the platenglass 25.

According to the illustrative embodiment, the original sheets GS areplaced on the sheet feeding tray 2 such that a scan surface (i.e., asurface subject to scan) of each original sheet GS face the placementsurface of the sheet feeding tray 2. The scanning unit 24 is arrangedbelow the conveying path 20, and scans an image on the scan surface ofthe original sheet GS as it passes over the platen glass 25. An originalsheet sensor 27 is arranged on the sheet feeding tray 2, which sensor 25is turned ON when one or more original sheets GS are placed on the sheetfeeding tray 2, while the sensor 25 is turned OFF when there is no sheetGS on the sheet feeding tray 2.

In FIG. 2, the scanning unit 24 has a light source 30, a light receivingunit 31, and an optical element 32. The light source 30 includes red,green and blue LEDs (light emitting diodes) emitting red, green and bluelight, respectively. The light emitted from the light source 30 isreflected by the scan surface of the original sheet GS at a portionabove the platen glass 25. Then, the reflected light is directed to thelight receiving element 31 through the optical element 32. When thecolor mode is selected, one line of the image on the original sheet GSis scanned by sequentially turning on the red, green and blue LEDs. Whenthe monochrome mode is selected, a specific one of the three-color LEDs(e.g., the red LED) is turned on to obtain one line of image on theoriginal sheet GS.

A gray reference plate 34 is arranged at a position opposite to thescanning unit 24 with respect to the conveying path 20 and facing thescanning unit 24. The gray reference plate 34 has a lower reflectioncoefficient than a background color (i.e., white) of the original sheetGS. When there is not an original sheet GS in the conveying path 20, thelight emitted by the light source 30 is reflected by the gray referenceplate 34, and the reflected light is received, through the opticalelement 32, by the light receiving unit 31. According to theillustrative embodiment, the optical element 32 includes a rod lensextending in a direction of a main scanning direction MD (see FIG. 3).

In FIG. 3, the light receiving unit 31 has a plurality of sensor IC(integrated circuit) chips linearly arranged in the main scanningdirection MD. Each IC chip includes a plurality of photoelectricconversion elements 33 aligned in the main scanning direction MD, andfurther includes a shift register and a built-in amplifier. Theplurality of sensor IC chips are divided into six channels CH1-CH6. Eachchannel includes one or two sensor IC chips. Since a configuration ofsuch a sensor IC chip (i.e., one having a plurality of IC chips) iswell-known, detailed description thereof will be omitted for brevity.

As shown in FIG. 4, the scanning apparatus 1 includes a CPU (centralprocessing unit) 40, a ROM (read only memory) 41, a RAM (random accessmemory) 42, a flash PROM (a flash programmable ROM) 43, a device controlunit 44, an analog front end IC (hereinafter, abbreviated as AFE) 45, animage processing unit 46 and a driving circuit 47. These components areconnected to the operation unit 5, the display unit 6 and the originalsheet sensor 27 through a bus 48.

The ROM 41 stores programs causing the image scanning apparatus 1 toexecute a maintenance main process, a scanning main process, and subprocesses called in the main processes. The CPU 40 controls respectivecomponents/units in accordance with the programs retrieved from the ROM41. The flash PROM 43 is a rewritable non-volatile memory and storesvarious pieces of data which are generated during processing of the CPU40 (e.g., current values and illumination periods). The RAM 42temporarily stores calculation results and the like generated during thecontrolling processes executed by the CPU 40.

The device control unit 44 is connected to the scanning unit 24, andtransmits signals to control power on/off of the light source 30 and asignal to control a value of an electrical current flowing through thelight source 30 to the scanning unit 24 under control of the CPU 40.Further, the device control unit 44 transmits a clock signal CLK and aserial in signal SI to the light receiving unit 31 (see FIG. 3) in orderto sequentially drive the plurality of photoelectric conversion elements33 of each of the IC chips of the light receiving unit 31 in accordancewith instructions from the CPU 40. When the scanning unit 24 receivesthe illumination control signal from the device control unit 44, thescanning unit 24 powers on the light source 30 and transmits the analogsignal corresponding to the light quantity of the light the lightreceiving unit 31 has received to the AFE 45.

The AFE 45 is connected to the scanning unit 24, and converts the analogsignal transmitted from the scanning unit 24 to a digital signal inaccordance with instructions from the CPU 40. The AFE 45 has apredetermined input range and resolution power. For example, when theresolution power is 10 bits, 1024 gradation steps (i.e., 0-1023) can beachieved. In such a case, the AFE 45 is capable of converting the analogsignal transmitted from the scanning unit 24 into 10-bit digital signal(i.e., gradation data) represented in 1024 gradation steps. Thegradation data converted and generated by the AFE 45 is transmitted tothe image processing unit 46. The image processing unit 46 includes anASIC (application-specific integrated circuit) particularly designed foran image processing, and applies various image processing operations tothe gradation data. The image processing operations may include ashading correction, various types of other corrections (e.g., γcorrection), a resolution conversion process and the like. The imageprocessing unit 46 applies such image processing operations to thegradation data, and generates bit-rate converted image data, forexample, eight-bit image data. The thus generated image data istransmitted through the bus 48 to the RAM 42 and stored therein.

The driving circuit 47 is connected to the conveying motor MT, anddrives the conveying motor MT in accordance with driving instructionstransmitted from the CPU 40. The driving circuit 47 rotates theconveying motor MT in accordance with a rotation amount and a rotationdirection instructed by the driving instructions. When the conveyingmotor MT rotates by a predetermined amount, the conveying rollers 23 and26 rotate by predetermined angles, thereby the original sheet GS beingconveyed along the conveying path 20 by a predetermined distance.

The image scanning apparatus 1 mainly executes the maintenance mainprocess, which is executed before the original sheet GS is scanned, andthe scanning main process, which is executed to scan the original sheetGS. Steps M1-M10 of the maintenance main process and steps R1-R15 of thescanning main process, and steps of each sub process are executed by theCPU 40. A data processing the CPU 40 executes for one line is theprocess for each of the pixels of three colors in the color mode, or theprocess for each of the pixels of one specific color in the monochromemode.

The maintenance main process shown in FIG. 5 is executed before theimage scanning apparatus 1 is shipped from a factory, or a maintenanceoperation is executed by a service person after the image formingapparatus 1 was shipped, and is started when an operator operates theoperation unit 5 in accordance with a particular operation.

When the operator places a particular original sheet GS, which serves asa white reference, on the sheet feeding tray 2, the original sheetsensor 27 detects the particular original sheet GS. In accordance with adetection signal from the original sheet sensor 27, the CPU 40determines whether the original sheet GS is in the sheet feeding tray 2(M1). When there is an original sheet GS in the sheet feed tray 2 (M1:YES), the process proceeds to M2. When there is no original sheet GS inthe sheet feeding tray 2 (M1: NO), the process proceeds to M10, and anerror message notifying that there is no original sheet GS on the sheetfeeding tray 2 is displayed on the display unit 6 (M10), and themaintenance main process is terminated.

In M2, various adjustment processes for the AFE 45 are executed. The AFE45 outputs the gradation data within a range from the maximum gradationdata to the minimum gradation data. When the gradation data is the10-bit data, the maximum gradation data is “1023” and the minimumgradation data is “0”. A maximum input voltage and a minimum inputvoltage to be input to the AFE 45 in order to output the maximumgradation data and the minimum gradation data, respectively, arepreliminarily determined based on a configuration of an A/D convertorbuilt in the AFE 45. It is also noted that a maximum output voltage anda minimum output voltage of the analog signal output by thephotoelectric conversion element 33 of the light receiving unit 31 arepreliminarily determined based on a configuration of the photoelectricconversion elements 33. Thus, as one of adjustment operations of the AFE45, adjustment of an off-set value and an amplifier gain is executed.

In M3, a light quantity adjusting process is executed to adjust thescanning light quantity. The scanning light quantity adjustment processM3 is a process of calculating and setting an electrical current valueVCrd and an illuminating period DLrd for the light source 30 toilluminate the white-reference original sheet GS. The scanning lightquantity adjusting process M3 will be described in detail later.

In M4, a maximum value of white-referenced differences is detected. Thegradation data of white color output by the AFE 45 in accordance withthe analog signal transmitted from the light receiving unit 31 when thewhite-reference original sheet GS is illuminated under a state where thelight source 30 is powered on in accordance with the current value VCrdand the illuminating period DLrd set in M3 (i.e., the light quantityadjusting process), or the white-referenced white data Dww is obtainedrepeatedly for each of the pixels of one line by predetermined times,and stored in the RAM 42.

Then, an average value Aww of the white-referenced white data Dwwobtained by the predetermined times is calculated for each pixel of oneline, and stored in the RAM 42. It is noted that the average value Awwis a value averaging the gradation values of the white-referenced whitedata Dww for each pixel.

Further, black gradation data the AFE 45 outputs in accordance with theanalog signal transmitted from the light receiving unit 31, that is,white-referenced black data Dwb is repeatedly obtained for each of thepixels of one line by predetermined times and stored in the RAM 42.Then, an average value Awb of the white-referenced black data Dwbobtained by the predetermined times is calculated for each pixel of oneline, and stored in the RAM 42. It is noted that the average value Awbis a value averaging the gradation values of the white-referenced blackdata Dwb for each pixel.

Next, a white-referenced difference SAw is calculated by subtracting theaverage value Awb from the average value Aww for each pixel of one lineand stored in the RAM 42. Further, a maximum value SAwmax of thewhite-referenced differences SAw is detected and stored in the flashPROM 43.

In M5, a channel CHmax is identified. According to the illustrativeembodiment, the average value Aww of the white-referenced white data Dwwstored in the RAM 42 for each pixel of one line in stem M4 is retrieved.Then, in each of six channels CH1-CH6 of the light receiving unit 31,the maximum average value Awwmax of the average values Aww for eachpixel of one line are detected. Then, among the maximum average valuesAwwmax respectively corresponding to the six channels, the largest oneof the average value Awwmax is selected, and the channel CHmax havingthe largest average value Awwmax is identified. Channel informationrepresenting the channel CHmax having the largest (maximum) value isstored in the flash PROM 43.

In accordance with the detection signal transmitted from the originalsheet sensor 27, the CPU 40 determines whether there is an originalsheet on the sheet feeding tray 2 (M5). When there is no original sheetGS on the sheet feeding tray 2 (M6: NO), the process proceeds to adetection of maximum value of the gray-referenced gray data (M7). Whenthere is an original sheet GS on the sheet feeding tray 2 (M5: YES), theprocess proceeds to step M10, in which an error message notifying thatthe original sheets GS are placed on the sheet feeding tray 2 by erroris displayed on the display unit 6 (M10), and the maintenance process isterminated.

In M7, a maximum value of the gray-referenced gray data is detected.That is, the maximum gradation value Dggmax among the gradation valuesof the gray gradation data output by the AFE 45 in accordance with theanalog signal transmitted from the light receiving unit 31 when the grayreference plate 34 is illuminated and the light receiving unit 31receives light at a resolution RS under a condition where the lightsource 30 is powered on in accordance with the electrical current valueVCrd and the illuminating period DLrd set in M3 (i.e., the lightquantity adjusting process), or the gray-referenced gray data Dgg isdetected. The maximum value Dggmax and the resolution RS are stored inthe flash PROM 43. Detection of the maximum value of the gray-referencedgray data (M7) will be described in detail later.

In M8, the light quantity for the shading is adjusted. The shading lightquantity adjustment (M8) is a process of calculating the electricalcurrent value VCsh and the illuminating period DLsh when the lightsource 30 illuminates the gray reference plate 34 so that the AFE 45outputs the gradation data having the highest gradation value. Theshading light quantity adjustment in M8 will be described in detaillater.

In M9, gray-referenced differences SAg for one line are calculated. Thewhite gradation data output by the AFE 45 in accordance with the analogsignal transmitted from the light receiving unit 31 under a state wherethe light source 30 is powered on in accordance with the electricalcurrent value VCsh and the illuminating period DLsh set in M8 (i.e., thegray-referenced white data) Dgw is repeatedly obtained for each of thepixels of one line by a predetermined times and stored in the RAM 42.Then, an average value Agw of the repeatedly obtained gray-referencedwhite data Dgw is calculated for each of the pixels of one line andstored in the RAM 42. It is noted that the average value Agw is a valueaveraging the gradation values of the gray-referenced white data Dgw foreach pixel.

Further, black gradation data the AFE 45 outputs in accordance with theanalog signal transmitted from the light receiving unit 31, that is, thegray-referenced black data Dgb is repeatedly obtained for each of thepixels of one line by predetermined times, and stored in the RAM 42.Then, an average value Agb of the gray-referenced black data Dgbobtained by the predetermined times is calculated for each of the pixelsof one line and stored in the RAM 42. It is noted that the average valueAgb is a value averaging the gradation values of the gray-referencedblack data Dgb for each pixel.

The gray-referenced difference Sag is calculated by subtracting theaverage value Agb from the average value Agw for each of the pixels ofone line. Then, the white-referenced difference SAw which is stored foreach pixel in M4 is retrieved, and a difference ratio is calculated bydividing the gray-referenced difference SAg by the white-referenceddifference SAw for each pixel. Then, an average of the difference ratiofor one line is calculated. Further, a threshold value is calculated byadding a predetermined value to the average of the difference ratio.

For each pixel, it is determined whether the difference ratio is greaterthan the threshold value. When at least one difference ratio is greaterthan the threshold value, it is determined that an anomaly pixel exists.In such a case, an error message instructing the user to re-execute themaintenance main process is displayed on the display unit 6. When allthe difference ratios are equal to or less than the threshold value, thegray-referenced differences SAg for one line area stored in the flashPROM 43. When calculation of the gray-referenced differences for oneline (M) is finished, the maintenance main process is terminated.

The predetermined value added to the average value of the differenceratio is determined in advance by experiment so that effects of anomalypixels can be eliminated. According to the illustrative embodiment, thepredetermined value is calculated by multiplying the average value ofthe difference ratio with a predetermined ratio. The predetermined ratiois determined based on causes such as a secular change of the grayreference plate 34, a variation of the analog voltages generated by thelight receiving unit 31 of the scanning unit 24, and the like.

Next, referring to FIG. 6, a scanning light quantity adjusting processwill be described, which is called in M3 of the maintenance main processshown in FIG. 5. When the light quantity adjusting process is started,various pieces of data are initialized (MA1). For example, illuminationstart time and end time of the light source 30, an electrical currentvalue for the light source 30 are initialized. The illumination end timeis set such that the illuminating period of the light source 30 becomesa longest possible period, while the electrical current value is set tobe the smallest possible value.

In MA2, an overflow determination value is set. According to theillustrative embodiment, as the overflow determination value, thegreatest gradation value of the gradation data stored in the flash PROM43 is used. Thus, when the gradation data is a 10-bit data, “1023” isset as the overflow determination value.

In MA3, the light source 30 is powered on, and emits light in accordancewith the initialized illumination start time, illumination end time, andelectrical current value. As the light source 30 is powered on, thewhite-reference original sheet GS is illuminated by the light emitted bythe light source 30, and the AFE 45 outputs the gradation data for eachpixel in accordance with the analog signal received from the lightreceiving unit 31.

In MA4, the number PN of the overflow pixels is detected. According tothe illustrative embodiment, the gradation data output by the AFE 45 foreach of the pixels of one line is compared with the overflowdetermination value which is initialized in MA2, and the number of thepixels of which the gradation data represents a value greater than theoverflow determination value.

In MA5, the CPU 40 determines whether the number PN of the pixels isequal to or greater than the predetermined number. It is noted that thisstep is executed to remove the gradation data of the anomaly pixels. Thenumber of the anomaly pixels, of which the gradation data variesexcessively due to dust or the like, is obtained by experiment within achannel in which the gradation data exhibiting the maximum gradationvalue within one line of gradation data, and thus obtained number of theanomaly pixels is set as the predetermined number therefor. According tothe illustrative embodiment, the predetermined number is determinedbased on the resolution power, and is fifteen (15) when the resolutionis 300 dpi (dots per inch). When the number PN of the pixels is lessthan the predetermined value (MA5: NO), the process proceeds to MA6,while when the number PN of the pixels is equal to or greater than thepredetermined value (MA5: YES), the process proceeds to MA7.

When the number PN of the pixels is less than the predetermined number(MA5: NO), the electrical current value is increased (MA6), and theprocess proceeds to MA3. In MA3, the light source 30 is turned on inaccordance with the initialized illumination start time and end time,and the electrical current value increased in MA6.

When the number PN of the pixels has reached the predetermined number,it is determined whether the electrical current value as increased inMA6 is greater than the maximum current value (MA7). When the electricalcurrent value is greater than the maximum electrical current value (MA7:YES), the electrical current value is set to the maximum electricalcurrent value (MA8), and the process proceeds to MA9. When theelectrical current value is equal to or less than the maximum electricalcurrent value (MA7: NO), the process proceeds to MA9.

In MA9, a change value is initialized. The change value is a minimumunit value for changing the illuminating period and preliminarilydetermined. Further, in MA10, the overflow determination value is set tothe gradation data of the greatest gradation value stored in the flashPROM 43 as in step MA2.

In MA11, the light source 30 is powered on in accordance with theinitialized start time and end time, and the electrical current valueincreased in MA6 or the maximum electrical current value set in MA8. Asthe light source 30 is power on, the white reference original sheet GSis illuminated by the light, and the AFE 45 outputs gradation data foreach pixel in accordance with the analog signal output by the lightreceiving unit 31.

In MA12, the number PN of the overflow pixels is detected. According tothe illustrative embodiment, the gradation data output by the AFE 45 iscompared with the overflow determination value set in MA10, and thenumber of pixels exhibiting the gradation data of which value is equalto or greater than the overflow determination value is detected.

In MA13, it is determined whether the number PN of the pixels is greaterthan the predetermined number. It is noted that MA13 is executed,similar to MA5, to remove the gradation data of the anomaly pixels. Thepredetermined number is the same value as is used in MA5. When thenumber PN of the pixels is equal to or greater than the predeterminednumber (MA13: YES), the process proceeds to MA14. When the number PN ofthe pixels is less than the predetermined number (MA13: NO), the processproceeds to MA15.

When the number PN of the pixel is equal to or greater than thepredetermined number, the illuminating period is reduced by the changevalue (MA14). That is, the illuminating period is shortened such thatthe end time becomes earlier by the change value initialized in MA9.After execution of MA14, the process returns to MA11. In MA11, the lightsource is powered on in accordance with the illuminating period which isreduced in MA14, and the electrical current value increased in MA6 orthe maximum electrical current value set in MA8.

When the number PN of the pixels is less than the predetermined number,the illuminating period is increased by the change value (MA15), and thechange value to be used next is calculated (MA16). According to theillustrative embodiment, the next change value is half the currentchange value.

In MA17, it is determined whether the change value calculated in MA16 issmaller than a minimum change value. When the change value is equal toor greater than the minimum change value (MA17: NO), process returns toMA11. When the change value is smaller than the minimum change value(MA17: YES), the process proceeds to MA18.

In MA18, the electrical current value and the illuminating period arestored in the flash PROM 43. That is, the electrical current increasedin MA6 or the maximum electrical current value set in MA1 is stored inthe flash PROM 43 as the electrical current VCrd for scanning, and theilluminating period increased in MA15, or the illumination start timeand end time are stored in the flash PROM 43 as the illuminating periodLDrd for scanning After execution of MA18, the light quantity adjustingprocess is terminated.

When a maximum value of the gray-referenced gray data detection processshown in FIG. 7 is started, the scanning light quantity is retrieved(MB1). That is, the electrical current value VCrd and the illuminatingperiod DLrd stored in the flash PROM 43 in MA18 are retrieved.

Then, the channel CHmax which is identified in M5 is set in accordancewith channel information stored in the flash PROM 43 (MB2). Depending onthe channel setting, only for the gradation data corresponding to theanalog signal output by the photoelectric conversion element 33 of theset channel CHmax among the six channels CH1-CH6, a data processingshown in FIG. 7 is executed.

In MB3, the change value is initialized. The change value is a minimumunit value used to change the overflow determination value. In MB4, theoverflow determination value is set. According to the illustrativeembodiment, the overflow determination value is set to the highest valueof the gradation data stored in the flash PROM 43. For example, when thegradation data is a 10-bit data, the highest gradation value of “1023”is set as the overflow determination value.

In MB5, the light source 30 is powered on in accordance with theelectrical current value VCrd and the illuminating period DLrd retrievedin MB1. As the light source 30 is powered on, the gray reference plate34 is illuminated by light, and the AFE 45 outputs the gray gradationdata for each pixel, that is, the gray-referenced gray data inaccordance with the analog signal transmitted from the light receivingunit 31.

In MB6, the number PN of the overflow pixels is detected. That is, foreach of the pixels of the channel CHmax set in MB2, the gray-referencedgray data Dgg output by the AFE 45 is compared with the overflowdetermination value, and the number of pixels exhibiting thegray-referenced gray data Dgg which is equal to or greater than theoverflow determination value is detected.

In MB7, it is determined whether the number PN of the pixels is equal toor greater than the predetermined number. It is noted that MB7 isexecuted in order to remove the gradation data of the anomaly pixels.The number of the anomaly pixels, of which the gradation data variesexcessively due to dust or the like, is obtained by experiment and setas the predetermined number. According to the illustrative embodiment,the predetermined number is fifteen (15). When the number PN of thepixels is less than the predetermined number (MB7: NO), the processproceeds to MB8. When the number PN of the pixels is equal to or greaterthan the predetermined number (MB7: YES), the process proceeds to MB9.

In MB8, when the number PN of the pixels is less than the predeterminednumber, the overflow determination value is reduced by the change valueset in MB3, and the process returns to MB5.

In MB9, when the number PN has reached the predetermined number, theoverflow determination value is increased by the change value set inMB3. Then, the next change value is calculated (MB10). According to theillustrative embodiment, the next change value is half the currentchange value.

In MB11, it is determined whether the change value is smaller than theminimum change value. When the change value is equal to or greater thanthe minimum change value (MB11: NO), the process returns to MB5. Whenthe change value is smaller than the minimum change value (MB11: YES),the process proceeds to MB12.

In MB12, the overflow determination value and the resolution power arestored. That is, the overflow determination value increased in MB9 andthe resolution of the gray-referenced gray data Dgg compared with theoverflow determination value in MB6 are stored in the flash PROM 43.After execution of MB12, the maximum value of gray-referenced gray datadetection process shown in FIG. 7 is terminated.

The overflow determination value stored in MB12 corresponds to themaximum value Dggmax which is the maximum gradation value among thegradation values of the gray-referenced gray data output by the AFE 45excluding the gray-referenced gray data Dgg of the anomaly pixels undera state where the light source 30 illuminates the gray reference platein accordance with the electrical current value VDrd and theilluminating period DLrd which are the values causing the AFE 45 tooutput the maximum gradation data when the white reference originalsheet GS is illuminated. Therefore, in this specification, the overflowdetermination value and the resolution stored in MB12 will be referredto as the maximum value Dggmax and the resolution RS, respectively.

Next, the shading light quantity adjusting process, which is called inM8 of the maintenance main process, will be described with reference toFIG. 8. When the shading light quantity adjusting process is started,steps MC1, MC3-MC19 which are similar to steps MA1-MA18 which are thesteps of the scanning light quantity adjusting process are executed.Since the steps are substantially similar, among the steps shown in FIG.8, ones different from the steps of the scanning light quantityadjusting process will be described.

In MC1, data is initialized (MC1). For example, the illuminating period,the illumination start/end times, and the electrical current value forthe light source 30 are initialized. At this stage, the illumination endtime is set such that the illuminating period of the light source 30 hasa maximum period, and the electrical current is set to the minimumcurrent value.

The channel CHmax identified in M5 (see FIG. 5) is set in MC2 inaccordance with the channel information stored in the flash PROM 43. Bysetting the channel, data processing in the shading light quantityadjusting process is executed using the gradation data corresponding tothe analog signal output by the photoelectric conversion element 33 ofthe thus set channel CHmax among the six channels CH1-CH6.

In MC3, the overflow determination value is set. That is, the overflowdetermination value is set to the gradation data having the highestgradation value stored in the flash PROM 43. For example, when thegradation data is 10-bit data, “1023” is set as the overflowdetermination value in MC3.

Steps MC4-MC9 are executed similarly to steps MA3-MA8 described above,and the electrical current value for the shading is determined. It isnoted, however, in step MC5, the gradation data output by the AFE 45 foreach pixel in the channel CHmax which is set in MC2 is compared with theoverflow determination value set in MC3, and the number of the pixels,in the set channel CHmax, having the gradation data of which value isequal to or greater than the overflow determination value.

In MC10, the change value is initialized. The change value is theminimum unit value for changing the illuminating period, andpreliminarily determined. Further, the overflow determination value isset to the gradation data of the highest gradation value stored in theflash PROM 43, as in MC3.

Steps MC12-MC18 are executed similarly to steps MA11-MA17, and theilluminating period is determined. It is noted that, in MC13, thegradation data output by the AFE 45 for each pixel in the channel CHmaxwhich is set in MC2 is compared with the overflow determination valueset in MC11, and the number of pixels, in the set channel CHmax, havingthe gradation data of which value is equal to or greater than theoverflow determination value.

In MC19, the electrical current value and the illuminating period arestored in the flash PROM 43. That is, the electrical current valueincreased in MC7 or set to the maximum electrical current value in MC9is stored in the flash PROM 43 as the electrical current value VCsh forthe shading, and the illuminating period increased in MC16 (i.e., theillumination start/end times) is stored, as the illuminating period DLshfor the shading, in the flash PROM 43. After execution of MC19, theshading light quantity adjusting process is terminated.

FIG. 9 shows a scanning main process, which is started when the userplaces the original sheets GS in the sheet feeding gray 2 and operates ascanning start button of the operation unit 5.

When the user operates the scanning start button of the operation unit5, the original sheet sensor 27 detects the original sheets GS. Inresponse to the detection signal output by the original sheet sensor GS,conveying of the original sheets GS is started (R1). In R2, variousadjustments for the AFE 45 are executed. Since the adjustment of the AFE45 is executed similar to that executed in M2 of the maintenance mainprocess, detailed description thereof will be omitted for brevity.

As a process different from the scanning light quantity adjustingprocess (M3), a step of setting the channel CHmax identified in M5 basedon the channel information stored in the flash PROM 43 is added betweensteps MA1 and step MA2. Accordingly, in this case, the gradation dataoutput by the AFE 45 and converted with the overflow determination valuein MA4 and MA12 is limited to the gradation data in the identifiedchannel CHmax.

In MA2 and MA10, the overflow determination value is set to thegradation data of the highest gradation value stored in the flash PROM43. In the scanning light quantity adjusting process (R3), however, theoverflow determination value is set to the maximum value Dggmax of thegray-referenced gray data Dgg stored in the flash PROM 43 in MB12.

Further, in MA18 shown in FIG. 6, the electrical current value VCrd andthe illuminating period DLrd are stored in the flash PROM 43 as theelectrical current value and the illuminating period in the maintenancemain process. In contrast, in the scanning light quantity adjustingprocess, the electrical current value VCrd1 and the illuminating periodDLrd1 are stored in the flash PROM 43 as the electrical current valueand the illuminating period for scanning in the original sheet scanningprocess.

In R4, the shading light quantity is adjusted. The adjustment of theshading light quantity includes the steps similar to steps MC1-MC29 ofthe shading light adjusting process (M8) of the maintenance mainprocess. It is noted that, in MC19 shown in FIG. 8, the electricalcurrent value VCsh and the illuminating period DLsh are stored in theflash PROM 43 as the electrical current value and the illuminatingperiod of the shading in the maintenance main process. However, in R4 ofthe shading light quantity adjusting process, the electrical currentvalue VCsh1 and the illuminating period DLsh1 are stored in the flashPROM 43 as the electrical current value and the illuminating period forthe shading in the original sheet scanning process.

In R5, a calibration is executed. When a difference between the maximumvalue Dggmax1 which is detected in the calibration step R5 and themaximum value Dggmax of the gray-referenced gray data detected in M7exceeds a predetermined value, the scanning light quantity adjustingprocess is re-executed. Details of the calibration will be describedlater.

In R6, an average value of the gray-referenced data is calculated. Whenthe gray reference plate 34 is illuminated by the light source 30 whichis driven in accordance with the electrical current value VCsh1 and theilluminating period DLsh1 set in R4, the white gradation data output bythe AFE 45 in accordance with the analog signal transmitted from thelight receiving unit 31, that is the gray-referenced gray data Dgw isrepeatedly obtained for each of pixels of one line by the predeterminedtimes and stored in the RAM 42. An average value Agw of thegray-referenced white data Dgw repeatedly obtained by the predeterminedtimes is calculated for each pixel and stored in the RAM 42.

When the light source 30 is powered off, the back gradation data outputby the AFE 45 in accordance with the analog signal transmitted from thelight receiving unit, that is, the gray-referenced black data) Dgb isrepeatedly obtained for each of the pixels of one line, and stored inthe RAM 42. An average value Agb of the gray-referenced black data Dgbobtained by the predetermined times is calculated for each pixel andstored in the RAM 42. FIG. 13 shows change of the gradation values ofthe gray-referenced white data Dgw and the gray-referenced black dataDgb for one line. It is noted that, in FIG. 13, a vertical axisrepresents the gradation value of the gradation data output by the AFE45, while a horizontal axis represents a position of each of the pixelsof one line, from a top thereof to the end thereof. In FIG. 13, thegray-referenced gray data Dgg is also indicated.

In R7, the shading correction difference is set. When the gray-referencedifference is greater than the threshold value, the gray-referencedifference of the anomaly pixel is replaced with gray-referencedifferences of neighboring pixels, the gray-reference difference of theanomaly pixel is corrected. The one line of gray-reference differencesincluding the corrected gray-reference difference are set as the shadingcorrection difference. Details of setting of the shading correctiondifference will be described later.

In R8, the shading correction data is calculated. By a series ofprocesses including a process of calculating a shading target value Atw,the shading data is calculated. Details of calculation of the shadingcorrection data will be described later.

In R9, the scanning mode is set. As settings of the scanning mode, aselection between the color mode and the monochrome mode, setting of theresolution and the like is executed. After setting of the scanning modeis executed, the original sheet GS is conveyed to the scanning startposition (R10). That is, the original sheet GS is conveyed with use ofthe feeding roller 21 and the upstream conveying rollers 23 until aleading end of the original sheet GS reaches a predetermined position onan upstream side of the scanning unit 24. Thereafter, the light source30 is driven in accordance with the electrical current value VCrd1 andthe illuminating period DLrd1 set in R3, or the electrical current valueVCrd2 and the illuminating period DLrd2 set in RA8, and the originalsheet GS is illuminated by the light emitted by the light source 30(R11).

In R12, scanning of the original sheet GS is started. When the image ofthe original sheet GS is scanned, the AFE 45 generates the gradationdata in accordance with the analog signal transmitted from the lightreceiving unit 31, and transmits the generated gradation data to theimage processing unit 46. The image processing unit 46 receives theshading correction data which is calculated in R8 from the CPU 40. Then,the image processing unit 46 corrects the gradation data with use of theshading correction data and generates image data. The thus generatedimage data is stored in the RAM 42.

When a trailing end of the original sheet GS has passed the scanningunit 24, the scanning of the original sheet GS is completed (R13). Whenthe scanning is completed, the light source 30 is powered off (R14).Based on the detection signal from the original sheet sensor 37, it isdetermined whether there exists a next original sheet GS (R15). Whenthere is a next original sheet GS to be scanned (R15: YES), the processreturns to R10. When there is not a next original sheet GS (R15: NO),the scanning main process is terminated.

Next, the calibration process shown in FIG. 10 will be described. Whenthe calibration process is started, scanning light quantity used tocause the light source 30 to illuminate the gray reference plate isretrieved (RA1). That is, the electrical current value VCrd1 and theilluminating period DLrd1 stored in the flash PROM 43 in R3 areretrieved.

In RA1, the maximum value of the current gray-referenced gray data isdetected. It is noted that the detection of the maximum value of thegray-referenced gray data in RA2 is executed by steps similar to thesteps MB2-MB12 of the maximum value of gray-referenced data detectionprocess (FIG. 7). In MB1 of FIG. 7, the electrical current value VCrdand the illuminating period DLrd stored in the flash PROM 43 in M3 areretrieved. However, when RA2 is executed, since the electrical currentvalue VCrd1 and the illuminating period DLrd1 are retrieved in RAL thereis no step corresponding to MB1. When the gray-referenced gray datamaximum value detection (RA) is executed, the maximum value Dggmax1 ofthe current gray-reference gray data Dgg1 and the current resolution RS1are stored in the flash PROM 43.

In RA3, the maximum value of the previous gray-referenced gray data isretrieved. That is, the maximum value Dggmax of the previousgray-referenced gray data Dgg stored in the flash PROM 43 in MB12 isretrieved.

In RA4, a difference of the maximum values is calculated. That is, bysubtracting the previous maximum value Dggmax retrieved in RA3 from thecurrent maximum value Dggmax1 stored in the flash PROM 43 in RA2, thedifference (Dggmax1−Dggmax) is calculated.

In RA5, it is determined whether the difference (Dggmax1−Dggmax) isgreater than a predetermined value. The predetermined value ispreliminarily determined by experiment. Generally, the gray referenceplate 34 deteriorates across the ages. Therefore, the gradation dataoutput by the AFE 45 when the gray reference plate 34 is illuminated bythe light source 30 gradually increases across the ages. To deal withsuch a secular change, according to the illustrative embodiment, a limitvalue of the difference is determined. When the difference is equal toor less than the predetermined value (RA5: NO), the calibration processis terminated. When the difference is greater than the predeterminedvalue (RA5: YES), the process proceeds to RA6.

In RA6, the scanning light quantity for the light source 30 toilluminate the gray reference plate 34 is retrieved as in RA1. That is,the electrical current value VCrd1 and the illuminating period DLrd1stored in the flash PROM 43 in R3 are retrieved.

In RA7, the maximum value of the gray-reference gray data is detected asin RA2. That is, detection of the maximum value in RA7 is executed inaccordance with the steps similar to MB2-MB12 of the process shown inFIG. 7. In the maximum value of gray-referenced data detection processin FIG. 7, the electrical current value VCrd and the illuminating periodDLrd which are stored in the flash PROM 43 in M3 (FIG. 5) are retrieved.However, since the electrical current value VCrd1 and the illuminatingperiod DLrd1 are retrieved in RA6, in step RA7, a step corresponding toMB1 does not exist. After execution of RA7, a maximum value Dggmax2 ofnew gray-reference gray data Dgg2 and a new resolution RS2 are stored inthe flash PROM 43.

In RA8, the scanning light quantity is adjusted. A light qualityadjusting process in RA8 is executed similar to the process R3. In RA8,the overflow determining value is set to the maximum value Dggmax2 ofthe new gray-referenced gray data Dgg2 stored in the flash PROM 43 inRA7. Further, in RA8, the new electrical current value VCrd2 and the newilluminating period DLrd2 are stored in the flash PROM 43 as theelectrical current value and the illuminating period for scanning.

When the shading correction difference setting process shown in FIG. 11is started, average value of the gray-referenced data for each of thepixels of one line is retrieved (RB1). That is, the average value Agw ofthe gray-referenced white data Dgw and the average value Agb of thegray-referenced black data Dgb stored in the RAM 42 in R6 are retrievedfor each of the pixels of one line.

In RB2, a current gray-referenced difference is calculated. That is, bysubtracting the average value Agb of the gray-reference black data Dgbfrom the average value Agw of the gray-reference white data Dgwretrieved in RB1, the current gray-referenced difference SAg1 of each ofthe pixels of one line is calculated and stored in the RAM 42. Thecurrent gray-referenced difference SAg1 is the gray-referenceddifference calculated in the scanning main process.

In RB3, the previous gray-referenced difference is retrieved. That is,the previous gray-referenced difference SAg2 stored in the flash PROM 43in M9 is retrieved for each of the pixels of one line. The previousgray-referenced difference SAg2 is the gray-reference differencecalculated in the maintenance main process and a difference calculatedby subtracting the average value Agb of the gray-referenced black dataDgb from the average value Agw of the gray-referenced white data Dgw.

In RB4, the ratio of the gray-referenced differences is calculated. Thatis, a difference ratio (Sag1/Sag2) for each of the pixels of one line isobtained by dividing the current gray-referenced difference SAg1 withthe previous gray-referenced difference SAg2.

In RB5, an average of the difference ratios of the gray-referenceddifferences is calculated (RB5). Then, a threshold value is calculatedby adding a predetermined value to the average of the difference ratio(RB6). The predetermined value is preliminarily determined throughexperiment so that effects of the anomaly pixels can be removed.According to the illustrative embodiment, the predetermined value isdetermined by multiplying the average of the difference ratio by apredetermined ratio. The predetermined ratio is preliminarily determinedtaking causes such as secular change of the gray reference plate 34,variation of the analog voltage generated by the light receiving unit 31and the like into consideration.

In RB7, it is determined whether the difference ratio of thegray-referenced difference is greater than the threshold value. When thedifference ratio of the gray-referenced difference is greater than thethreshold value (RB7: YES), the process proceeds to RB8. When thedifference ratio of the gray-referenced difference is equal to or lessthan the threshold value (RB7: NO), the process proceeds to RB10.

When the difference ratio of the gray-referenced difference is greaterthan the threshold value, a position of the anomaly pixel can beidentified (RB8). That is, when the difference ratio is greater than thethreshold value, the pixel having the current gray-referenced differenceSAg1 is identified as the anomaly pixel, and the position of the anomalypixel within one line can be identified.

In RB9, the gray-referenced difference of the anomaly pixel is replacedwith the gray-referenced difference of the neighboring pixels. Afterexecution of RB9, the process proceeds to RB10. It is noted that theneighboring pixels are pixels adjacent to a specific anomaly pixel ofwhich gray-referenced difference is to be replaced, or a pixel apartfrom the specific anomaly pixel by a predetermined number of pixels soas not be affected by the gradation data of the specific anomaly pixel.

In RB10, it is determined whether determination of RB7 is made for allthe pixels. When the determination of RB7 has not be made for all thepixels (RB10: NO), the process returns to RB7. When the determination inRB7 has been made for all the pixels (RB10: YES), the process proceedsto RB11.

The gray-referenced difference is set to the shading correctiondifference (RB11). That is, the current gray-referenced difference SAg1for each pixel stored in the RAM 42 in RB2, and the gray-referenceddifference replaced in RB9 are set to the shading correction difference.After execution of RB11, the shading correction difference setting isterminated.

When the shading correction difference setting process (FIG. 12) isstarted, the shading correction difference for each of the pixels of oneline is retrieved (RC1). That is, the shading correction differencesSAg1 set in RB11 are retrieved.

In accordance with the channel information stored in the flash PROM 43,the channel CHmax identified in M5 is set (RC2). As the channel CHmax isset, data processing to calculate the shading correction data in R8,only the gradation data corresponding to the analog signal output by thephotoelectric conversion element 33 of the set channel CHmax, among sixchannels CH1-CH6, will be used.

From among the shading correction differences SAg1 for respective pixelsin the identified channel CHmax, an N-th shading correction differenceSAgmax1 at an N-th (N being a predetermined number) order from themaximum shading correction difference SAg1 is identified (RC3). Thenumber of anomaly pixels of which gradation data may largely varies dueto dust is preliminarily determined through experiment, and thepredetermined number is set to that value. According to the illustrativeembodiment, the predetermined number N is fifteen (15).

In RC4, the maximum value of the white-referenced differences isretrieved. That is, the maximum value SAwmax of the white-referenceddifferences Saw stored in the flash PROM 43 in M4 of the maintenancemain process is retrieved.

In RC5, a shading target value Atw is calculated. That is, the shadingtarget value Atw is calculated by multiplying the maximum gradationvalue by the difference ratio SAgmax1/SAwmax of the shading correctiondifference SAgmax1 identified in RC3 and the maximum value SAwmaxretrieved in RC4. According to the illustrative embodiment, the maximumgradation value is represented by the 10-bit data and is “1023”. Theshading target value Atw is calculated as 10-bit data.

In RC6, for each pixel, the shading correction data is calculated. Thatis, by dividing the 10-bit maximum gradation value “1023” by thedifference calculated by subtracting the average value Agb of thegray-referenced black data Dgb from the shading target value Atw, theshading correction data is calculated as follows:Shading correction data=1023/(Atw−Agb)

According to the illustrative embodiment, the maximum value SAwmax ofthe white-referenced difference SA2 is obtained in M4 (FIG. 5) using thewhite-reference original sheet GS, and the maximum value Dggmax of thegray-referenced gray data Dgg is obtained in MB12 (FIG. 7) using thegray reference plate 34, and both the maximum values SAwmax and Dggmaxare stored in the flash PROM 43 before the original sheet GS is scanned.

When the original sheet GS is scanned using the gray reference plate 34,the electrical current VCrd1 and the illuminating period DLrd1 areobtained in accordance with the maximum value Dggmax in R3 of thescanning main process (FIG. 9), and the greatest shading correctiondifference SAgmax1 is obtained in RC3 of the shading correction datacalculation (FIG. 12).

The greatest shading correction difference SAgmax1 represents themaximum value of the gray-referenced difference calculated bysubtracting the average value Agb of the gray-referenced black data fromthe average Agw of the gray-reference white data.

The shading target value Atw is calculated in accordance with thedifference ratio of the shading correction difference SAgmax1 and themaximum value Sawmax in RC5 (FIG. 12), and the shading correction datais calculated in accordance with the shading target value Atw in RC6(FIG. 12).

As a result, when the original sheet GS is scanned, the shading targetvalue Atw which is the white-referenced data necessary to calculate theshading correction data can be calculated without scanning the whitereference member.

Further, the maximum value Dggmax is the maximum value of the graygradation data output by the AFE 45 when the light source 30 illuminatesthe gray reference plate 34 in accordance with the electrical currentand the illuminating period which are set so that the maximum valueSAwmax is output.

As a result, when the white background of the original sheet GS isscanned with the light source 30 is powered on in accordance with theelectrical current value VDrd1 and the illuminating period DLrd1 forscanning, the white gradation data output by the AFE 45 is close to thewhite-reference data which may be output by the AFE 45 when thewhite-referenced original sheet GS is scanned, and fluctuation of tonegradation causing lines or the like can be suppressed.

Further, with use of the gray reference plate 34, the show-throughphenomenon can be reduced. Furthermore, with use of the gray referenceplate 34, it is ensured to distinguish the white background part of theoriginal sheet GS from the gray of the gray reference plate 34, andpassage of the edges of the originals sheet GS can be detected.

According to the illustrative embodiment, the calibration (R5) isexecuted in the scanning main process and the maximum value of the newgray-referenced gray data Dgg2 is obtained in RA7 and the new electricalcurrent value VDrd2 and the new illuminating period DLrd2 are obtainedin RA8 (FIG. 10). As a result, even if the gray reference plate 34 isdeteriorated across the ages and the maximum value Dggmax is varied, thedata necessary for scanning the original sheet GS, that is, the maximumvalue Dggmax, the electrical current value and the illuminating periodare obtained again, accurate shading correction data can be generated.

According to the illustrative embodiment, in order to eliminate thegradation data of the anomaly pixels from the gradation data output bythe AFE 45, the predetermined number referred to in MA5 and MA13 (FIG.6), MB7 (FIG. 7), MC6 and MC14 (FIG. 8), R3 and R4 (FIG. 9) are set tothe number of the anomaly pixels.

Further, the predetermined value set in RB6 (FIG. 11) is determined as avalue to eliminate the effects of the anomaly pixels. As a result, theelectrical current value and the illuminating period for shading, andthe maximum value Dggmax can be set without being affected by theanomaly pixels.

The image scanning apparatus 1 and the gray reference plate 34 areexamples of image scanning apparatus and gray reference member set forthin claims, respectively. Further, the scanning unit 24, the light source30 and the photoelectric conversion elements 33 of the light receivingunit 31 are examples of scanning unit, light source and photoelectricconversion elements set forth in the claims, respectively. The AFE 34 isan example of a signal conversion unit set forth in the claims.

Steps M4, M7 and RA7 executed by the CPU 40 realize an example of anoperation of a controller to obtain a greatest gradation value among aplurality of gradation values of gray signals and a first differencevalue obtained by subtracting the gradation value of a black signaloutput by the photoelectric conversion unit from the greatest graygradation value which is set forth in the claims.

Steps R3 and RA8 executed by the CPU 40 realize an example of anoperation of the controller to set a second light quantity set forth inthe claims.

Steps R4 and R6-R8 executed by the CPU 40 realize an example of anoperation of the controller to calculate a shading correction value setforth in the claims.

The flash PROM 43 is an example of a storage set forth in the claims.

A step RA5 executed by the CPU 40 realizes an example of an operation ofthe controller to determine set forth in the claims.

The white-referenced white data Dww is an example of a first gradationvalue of a white signal set forth in the claims. The gray-referencedgray data Dgg is an example of a gray signal, and the maximum valueAggmax of the average value Agg is an example of the greatest graygradation value set forth in the claims.

Further, the maximum value SAwmax of the differences SAw which areobtained by subtracting the average value Awb of the white-referencedblack data Dwb from the average value Aww of the white-referenced whitedata Dww is an example of a first difference value set forth in theclaims. Further, an average value Agw of the gray-referenced white dataDgw is an example of a second gradation value of the white signal setforth in the claims. Further, a maximum value SAgmx of the differencesSAg which are obtained by subtracting an average Agb of thegray-referenced black data Dgb from the average value Agw of thegray-referenced white data Dgw is an example of a second differencevalue set forth in the claims.

It is noted that the above-described embodiment is an illustrativeembodiment and the scope the disclosures should not be limited to theconfiguration of the illustrative embodiment. As described below, theillustrative embodiment can be modified in various ways withoutdeparting from the scope of the disclosures.

The image scanning apparatus 1 according to the illustrative embodimentcould be applied to an MFP (multi-function peripheral) having a printerunit.

According to the illustrative embodiment, the image scanning apparatushas only one scanning unit 24 and one gray reference plate 34. Theconfiguration could be modified, to scan both sides of the originalsheet GS, such that two scanning units and tow gray reference plates maybe provided to the image scanning apparatus.

According to the illustrative embodiment, the maintenance main processshown in FIG. 5 and the scanning main process shown in FIG. 9 areexecuted by the CPU 40. It is noted that the scope of the disclosuresneed not be limited to the configuration of the illustrative embodiment.For example, portions of steps M3-M5, M7-M9 of the maintenance mainprocess and/or portions of R3-R8 of the scanning main process may beexecuted by the image processing unit 46. Alternatively, the aboveportions may be executed by an external device independent from theimage scanning apparatus 1, for example, by a PC (personal computer).

According to the illustrative embodiment, the average value Agw of thegradation value of the gray-reference white data Dgw and the averagevalue Agb or the gray-referenced black data for each pixel arecalculated.

In RB1 (FIG. 11), the average Agw of the gray-referenced white data Dgwand the average value Agb of the gray-referenced black data for each ofpixels of one line are retrieved in RB1 (FIG. 11). It is noted that thevalues retrieved in this step need not be limited to the average values.

For example, instead of the average values Agw and Agb, the gradationvalues of the gray-referenced white data Dgw and the gray-referencedblack data Dgb may be used.

According to the illustrative embodiment, the channel CHmax is set inaccordance with the channel information in MB2 (FIG. 7), MC2 (FIG. 8),R3 and R4 (FIG. 9), RA7 and RA8 (FIG. 10), and RC2 (FIG. 12). In thesestep, a channel is limited to the identified channel CHmax to which thephotoelectric conversion element 33 outputting the analog signalcorresponding to the brightest gradation value of the gradation dataamong the pieces of gradation data output from the AFE 45 for respectivepixels of one line belongs, and the gradation data corresponding to theanalog signal output by the photoelectric conversion element 33 of theidentified channel CHmax is used.

However, the scope of the disclosures need not be limited to such aconfiguration. That is, the gradation data output by the AFE 45 forrespective pixels of one line may be used. Alternatively, instead oflimiting a channel to one identified channel CHmax, one identifiedchannel CHmax and a channel next to the identified channel CHmax, fromamong the six channels CH1-CH6, may be used.

According to the illustrative embodiment, the overflow determinationvalue is set to the gradation data of the highest gradation value storedin the flash PROM 43. This configuration may be modified such that theoverflow determination value may be set to a predetermined gradationdata smaller than “1023”.

For example, the maximum value of the gray-reference white data, of thegradation data output by the AFE 45 for respective pixels of one linewhen the light source 30 illuminates the gray reference plate 34 withthe maximum electrical current value and the longest illuminationperiod, which are determined based on the configurations of the lightsource 30 and its driving circuit may be used as the overflowdetermination value. In such a case, the maximum value of thegray-reference white data is the data for the pixels of one line otherthat the anomaly pixels.

According to the illustrative embodiment, in order to eliminate thegradation data of the anomaly pixels from the gradation data output bythe AFE 45, the number of anomaly pixels is set to the predeterminednumber that is set in MA5 and MA13 (FIG. 6), MB7 (FIG. 7), MC6 and MC14(FIG. 8), and R3 and R4 (FIG. 9). However, the scope of the disclosuresneed not be limited to such a configuration.

For example, effects of the anomaly pixels are relatively small, thepredetermined number may be set to one (1), or based on causes such asscanning accuracy of the scanning unit 24. Further, the predeterminedvalue set in RB6 (FIG. 11) is also set to eliminate the effects of theanomaly pixels, this predetermined number may be set to zero (0) or avalue which is determined based on other causes.

What is claimed is:
 1. An image scanning apparatus, comprising: a grayreference member arranged in a conveying path in which an original sheetis to be conveyed, the gray reference member having a reflectioncoefficient smaller than that of a white color; a scanning unitconfigured to scan an image on the original sheet on a line basis, thescanning unit including a light source configured to illuminate theoriginal sheet when the original sheet is passing the gray referencemember and a plurality of photoelectric conversion elements aligned in ascanning direction which is a transverse direction of the conveyingpath; a signal conversion unit configured to convert analog signals fromthe plurality of photoelectric conversion elements to digital signals;and a controller, wherein the controller is configured to: obtain agreatest gray gradation value among a plurality of gradation values ofgray signals output by the signal conversion unit when the light sourceilluminates the gray reference member at a first light quantity value,the first light quantity value being set so that white signals would beoutput by the signal conversion unit if the light source wouldilluminate a white reference member at the first light quantity value;obtain a gradation value of a black signal output by the photoelectricconversion unit when the light source is powered off; calculate a firstdifference value by subtracting the gradation value of the black signalfrom the greatest gray gradation value among a plurality of gradationvalues of gray signals; set a second light quantity value such that agray signal having the gray gradation value is output by the signalconversion unit when the light source illuminates the gray referencemember at the second light quantity value; set a correction lightquantity value such that a white signal having a second gradation valueis output by the signal conversion unit when the light sourceilluminates the gray reference member; obtain a second difference valueby subtracting the gradation value of the black signal from the secondgradation value of a white signal which is output by the signalconversion unit when the light source illuminates the gray referencemember in accordance with the correction light quantity value; calculatea shading correction value based on a ratio of the second differencevalue to the first difference value; control the scanning unit to scanthe image on the original sheet with controlling the light source toilluminate the original sheet in accordance with the second lightquantity value; and apply the shading correction to the digital signaloutput by the signal conversion unit in accordance with the shadingcorrection value.
 2. The image scanning apparatus according to claim 1,wherein the controller is further configured to: obtain a greatest oneof difference values which are calculated by subtracting the gradationvalue of the black signal from the gradation values of the white signalsoutput by the signal conversion unit for respective pixels of one linewhen the light source illuminate the white reference member inaccordance with the first light quantity value as the first differencevalue; calculate a greatest one of difference values which arecalculated by subtracting the gradation value of the black signal fromthe gradation values of the white signals output by the signalconversion unit when the light source illuminates the gray referencemember in accordance with the correction light quantity value as thesecond difference value.
 3. The image scanning apparatus according toclaim 1, wherein the controller is further configured to: calculate ashading target value in accordance with a ratio of the second differencevalue to the first difference value and the first gradation value; andgenerate the gradation value of the black signal and the shading targetvalue as the shading correction values.
 4. The image scanning apparatusaccording to claim 1, wherein the controller is further configured toset the correction light quantity value so that a greatest gradationvalue among gradation values which can be output by the signalconversion unit when the light source illuminates the gray referencemember is obtained as the second gradation value.
 5. The image scanningapparatus according to claim 1, further comprising a storage, andwherein the controller is further configured to store the gray gradationvalue and the first difference value, which are detected, in advance,when the light source illuminates the white reference member and thegray reference member, respectively, in accordance with the first lightquality value in the storage.
 6. The image scanning apparatus accordingto claim 1, wherein the controller is further configured to: determinewhether a gradation difference between a current maximum gray gradationvalue which is a greatest one of gradation values of the gray signalsoutput by the signal conversion unit when the light source illuminatesthe gray reference member in accordance with the second light quantityvalue and a previously obtained maximum gray gradation value exceeds apredetermined value; and obtain the previous maximum gray gradationvalue instead of the current maximum gray gradation value before thescanning unit scans the image on the original sheet when it isdetermined that the gradation difference exceeds the predeterminedvalue.
 7. The image scanning apparatus according to claim 6, wherein thecontroller is further configured to set a new second light quantityvalue instead of the previously set second light quantity value so thatthe signal conversion unit outputs the gray signal having the currentgray gradation value when the light source illuminates the grayreference member, when it is determined that gradation differenceexceeds the predetermined value.
 8. The image scanning apparatusaccording to claim 1, wherein the controller is further configured toset the second light quantity value such that the gradation values ofthe gray signals output by the signal conversion unit corresponding to apredetermined number of pixels which have gradation values greater thangradation values corresponding to remaining pixels are eliminated and agreatest gradation value from among the gradation values respectivelycorresponding to the remaining pixels become the gray gradation valuewhen the light source illuminates the gray reference member.
 9. Theimage scanning apparatus according to claim 1, wherein the controller isfurther configured to set the correction light quantity value such thatthe gradation values of the white signals output by the signalconversion unit corresponding to a predetermined number of pixels whichhave gradation values greater than gradation values corresponding toremaining pixels are eliminated and a greatest gradation value fromamong the gradation values respectively corresponding to the remainingpixels become the second gradation value when the light sourceilluminates the gray reference member.